using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MCromwell.StaffIntranet.Presenters;
using MCromwell.StaffIntranet.DTO;
using System.Collections.Generic;

namespace MCromwell.StaffIntranet.UI.Binding
{
    public class StaffBindingProxy
    {
        private int total;

        public StaffBindingProxy()
        {
            
        }

        public IList<StaffDTO> RetrieveStaffForBinding(string LastName, string FirstName, int LocationId, StaffSearchingPresenter presenter, int RowIndex, int RowSize)
        {
            return presenter.SearchForStaffUsing(LastName, FirstName, LocationId, RowIndex, RowSize, out total);
        }

        public int StaffCount(string LastName, string FirstName, int LocationId, StaffSearchingPresenter presenter)
        {
            int currentTotal = total;
            total = 0;
            return currentTotal;
        }

        public void DeleteStaff(int Id, StaffDeletionPresenter presenter)
        {
            presenter.DeleteStaff(Id);
        }
                
    }
}
